fix: keep transitive scanning with --offline-vulnerabilities#2783
Open
gotgolem wants to merge 2 commits into
Open
fix: keep transitive scanning with --offline-vulnerabilities#2783gotgolem wants to merge 2 commits into
--offline-vulnerabilities#2783gotgolem wants to merge 2 commits into
Conversation
ee57ce6 to
d407f3d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2783 +/- ##
==========================================
- Coverage 79.19% 78.81% -0.38%
==========================================
Files 121 121
Lines 8185 8186 +1
==========================================
- Hits 6482 6452 -30
- Misses 1322 1347 +25
- Partials 381 387 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d407f3d to
401332d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes #2775.
--offline-vulnerabilitiesis documented as only switching vulnerability matching to the local DB, but it was also causing Scalibr to filter out network-backed plugins.That meant transitive dependency scanning was disabled even when
--no-resolvewas not passed.This PR keeps that behavior scoped to the full
--offlineflag instead.Details
I added a separate
ScannerActions.PluginNetworkDisabledfield and wire it from--offline.CompareOfflinestill controls the local vulnerability DB path. The source and container scan paths now usePluginNetworkDisabledwhen setting Scalibr's network capability.License behavior under
--offline-vulnerabilitiesis intentionally left unchanged in this PR.Testing
go test ./pkg/osvscanner ./cmd/osv-scanner/internal/helpergo test ./cmd/osv-scanner/scan/source -run TestCommand_Transitive -count=1Also ran:
./scripts/run_tests.shChecklist
./scripts/run_lints.sh../scripts/run_tests.sh.